|
cmdAddNonstdCharge
|
cmdAddNonstdCharge (
residues,
formalCharge,
method="am1",
gaffType=True,
)
Exceptions
|
|
MidasError("Residues not all the same type" " (%s != %s)" %( resName, r.type ) )
MidasError( "No such residues" )
MidasError(str( v ) )
MidasError("Residues have differing number of" " atoms (%d != %d)" %(numAtom, len( r.atoms ) ) )
|
|
|
estimateFormalCharge
|
estimateFormalCharge ( atoms )
|
|
addNonstandardResCharges
|
addNonstandardResCharges (
residues,
formalCharge,
method="am1-bcc",
gaffType=True,
status=None,
)
Add Antechamber charges to non-standard residue
residues is a list of residues of the same type. The first
residue in the list will be used as an exemplar for the whole
type for purposes of charge determination, but charges will be
added to all residues in the list.
formalCharge is the formal charge of the residue type.
method is either am1-bcc or gasteiger
gaffType is a boolean that determines whether GAFF
atom types are assigned to atoms in non-standard residues
status is where status messages go (e.g. replyobj.status)
Hydrogens need to be present.
The return value is True if charge addition succeeded.
Exceptions
|
|
IOError(mol2io.error() )
ChargeError( "Failure running ANTECHAMBER for residue %s\n" "Check reply log for details\n" % r.type )
RuntimeError( "No molecules in ANTECHAMBER output for" " residue %s" % r.type )
RuntimeError("Wrong number of atoms (%d, should be %d)" " in ANTECHAMBER output for residue %s" %(r.type, len( chargedAtoms ), len( nm.atoms ) ) )
ValueError( "Unknown charge method: %s" % method )
|
|
|
initiateAddCharges
|
initiateAddCharges (
models=None,
method=None,
gaffType=True,
status=None,
cb=None,
nogui=False,
)
add AMBER99/GAFF charges to models
models and status are the same as the arguments for
addStandardCharges. cb is a callback function to call
when charges have been added. It will be called with two
dictionary arguments which are the same format as the return
value of addStandardCharges. method is either "am1-bcc" or
"gasteiger" and specifies the charge method used by antechamber
(None = specified by user).
Hydrogens need to be present.
In nogui mode, this calls addStandardCharges() and
then addNonstandardResCharges() for each residue type without
charges (using a guesstimated formal charge) and then the cb()
function. If the proper formal charges are known, it is
probably better just to call addStandardCharges() and then
addNonstandardResCharges() directly.
In gui mode, addStandardCharges() will be run and then for
any unknown residues the user will be queried for the formal
charge and addNonstandardResCharges() will be invoked for
those residues. Then the cb function will be called.
|
|
addStandardCharges
|
addStandardCharges ( models=None, status=None )
add AMBER99 charges to well-known residues
models restricts the addition to the specified models
status is where status messages go (e.g. replyobj.status)
The return value is a 2-tuple of dictionaries: the first of which
details the residues that did not receive charges [key: residue
type, value: list of residues], and the second lists remaining
uncharged atoms [key: (residue type, atom name), value: list of
atoms]
Hydrogens need to be present.
|
|
cmdAddAllCharge
|
cmdAddAllCharge (
molecules=None,
method="am1",
gaffType=True,
)
Exceptions
|
|
MidasError( "Atom specifier does not select any models" )
|
|
|
cmdAddStdCharge
|
cmdAddStdCharge ( molecules=None )
|
|